#include <iostream>
#include <string>
using namespace std;

int main(){
    string words;
    while(getline(cin,words)){
       cout << words.substr(words.rfind(' ') + 1).size() << endl;
    }
    return 0;
}